package com.guang.thread;

import java.util.concurrent.TimeUnit;

/**
 * @author lg
 * @Description
 * @date 2022/10/25 10:03
 */
public class ThreadImplementsRunnableTest implements Runnable{


    @Override
    public void run() {
        System.out.println(String.format("当前的线程名称是：%s",Thread.currentThread().getName()));
    }

    public static void main(String[] args) {
        ThreadImplementsRunnableTest thread = new ThreadImplementsRunnableTest();
        Thread t1 = new Thread(thread, "t1");
        t1.start();
        System.out.println("-------------------------------------------");
        System.out.println(String.format("当前的线程名称是：%s",Thread.currentThread().getName()));
    }

}
